# 使用官方的 Java 运行时作为父镜像
FROM openjdk:8-jdk-alpine
# FROM adoptopenjdk:8-jdk-alpine

# 维护者信息
LABEL maintainer="huangjd"

# 设置工作目录
WORKDIR /sentinel

# 将本地的 sentinel-dashboard.jar 复制到容器中
COPY target/sentinel-dashboard.jar /sentinel/sentinel-dashboard.jar

# 将 application.properties 文件复制到容器中
COPY src/main/resources/application.properties /sentinel/application.properties

# 暴露端口
EXPOSE 8858

# 启动命令
ENTRYPOINT ["java", "-Dspring.config.location=/sentinel/application.properties", "-jar", "sentinel-dashboard.jar"]


# 构建镜像
#docker build -f Dockerfile -t sentinel-dashboard-sd:v1.8.1 .